#ifndef _THREADEXCEPTION_H
#define _THREADEXCEPTION_H

#include "platform.h"

#include <exception>
#if defined PLATFORM_WINDOWS
#include <windows.h>
#else
#include <pthread.h>
#endif

namespace ThreadLib
{

enum Error
{
    Unspecified,
    InitFailure,
    CreationFailure
};


class Exception : public std::exception
{
public:
    Exception( Error p_error = Unspecified )
    {
        m_error = p_error;
    }
    Error GetError() const
    {
        return m_error;
    }

protected:
    Error m_error;
};
}


#endif
